package com.victor9ac.mashup.usecase;

import com.victor9ac.mashup.api.travel.Travel;
import com.victor9ac.mashup.contract.TravelContract;
import com.victor9ac.mashup.port.TravelOperation;
import com.victor9ac.mashup.usecase.auxiliary.TravelGetTransport;


public class TravelUseCase implements TravelContract {

	TravelOperation travelOperation;
	

	public Travel getTravelInformationGivenADestination(String destination) {
		return travelOperation.getTravel(destination);
	}

	public Travel getTravelInformationPointToPoint(String from, String to) {
		Travel travel = travelOperation.getTravelFromTo(from, to);
		
		travel.generateTransports();
		
		return travel;
	}
	
	
	
	/**
	 * setters
	 * 
	 */
	
	public void setTravelOperation(TravelOperation travelOperation) {
		this.travelOperation = travelOperation;
	}
	
}
